package cn.b.training.baby_education_training.entity;

import com.fasterxml.jackson.annotation.JsonFormat;
import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.NoArgsConstructor;

import javax.persistence.*;
import java.util.Date;

/**
 * @program: baby_education
 * @description
 * @author: wuying
 * @create: 2022-11-29 10:03
 **/
@Entity
@Data
@AllArgsConstructor
@NoArgsConstructor
@Table(name = "baby_height")
public class BabyHeight {
    @Id
    @Column(name = "id")
    @GeneratedValue(strategy = GenerationType.IDENTITY)
    private Long id;

    @Column(name = "baby_id")
    private Long babyId;

    @Column(name = "age")
    private String age;

    @Column(name = "height")
    private Float height;

    @JsonFormat(pattern = "yyyy-MM-dd", timezone = "GMT+8")
    @Column(name = "record_time")
    private Date recordTime;
}
